import { lazy } from "react";

// const withLazy = (Component) => (props) =>
//   (
//     <ErrorBoundary>
//       <Suspense fallback={<Loading />}>
//         <Component {...props} />
//       </Suspense>
//     </ErrorBoundary>
//   );

const viewsMap = {
  // 控制台
  Dashboard: lazy(() => import("@/views/Dashboard/Dashboard")),

  // 权限管理
  PermissionMenu: lazy(() => import("@/views/Permission/Menu")),
  PermissionRole: lazy(() => import("@/views/Permission/Role")),

  // 用户管理
  User: lazy(() => import("@/views/User/User")),

  // 登录
  Login: lazy(() => import("@/views/Login/Login")),

  // 错误页面
  NotFound: lazy(() => import("@/views/ErrorPage/NotFound")),
};

export default viewsMap;
